/* 
 * File:   TypeDefs.h
 * Author: Nick
 *
 * Created on 22 April 2011, 4:42 PM
 */

#ifndef NRPSTG_COMMON_H
#define	NRPSTG_COMMON_H

#include <stdint.h>
#include <stddef.h>
#include <stdio.h>
#include <string.h>


//The number of blocks with a cell that are required before the cells block
//Lookup table will be created
#define CELL_CRITICAL_MASS 9

#define BLOCK_TYPE_BLOCK 0
#define BLOCK_TYPE_CELL 1

#define CELL_WIDTH 10
#define CELL_HEIGHT 10
#define CELL_DEPTH 10



#define byte uint8_t
typedef int8_t UNIT;
//UNIT_SIZE is equal to how many bytes are required to store unit.
#define UNIT_SIZE 1

#define null 0

#define X 0
#define Y 1
#define Z 2

#define WORLD_DEPTH 7

#define WORLD_XP 0
#define WORLD_XN 1
#define WORLD_YP 2
#define WORLD_YN 3
#define WORLD_ZP 4
#define WORLD_ZN 5

#define STATE_EMPTY 0 //Cell has been created but contains no data
#define STATE_LOADING 1 //Cell is loading
#define STATE_VAILD 2 //Cell has finished loading
#define STATE_WRITING 3 //Cell is being saved to some datasource
#define STATE_CLEAR 4 //Cell is no longer needed and can be deleted

#define HEIGHTEST_LEVEL 3
#define VIEW_DISTANCE 1

#endif	/* NRPSTG_COMMON_H */

